package com.tanjun.common.enums.user;

import com.fasterxml.jackson.annotation.JsonValue;
import com.mybatisflex.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SexEnum  {
    UN_KNOW(0,"未知"),
    MAN(1,"男"),
    WOMAN(2,"女"),;
    @JsonValue
    @EnumValue
    private Integer code;
    private String name;

    /**
     * 枚举数据库存储值
     */
    public Integer getValue() {
        return code;
    }
}
